﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current">
        
        <header class="bar bar-nav fs-header-small">
          <a href="${ctx.host}" class="icon icon-left pull-left"></a>
          <h1 class="title">我的消息</h1>
        </header>
        <div class="bar bar-header-secondary  bar-tab clearfix message-summary">
           <p class="pull-left no-margin">消息总计：${principalMessages.size()}&nbsp;条</p>
           <p class="pull-right no-margin">${newMessageCount}&nbsp;条未读消息</p>
        </div>
        
        <div class="content no-margin" style="bottom: 0px;">
          
          <div class="list-block media-list no-margin">
            <ul>
              <c:forEach var="message" items="${principalMessages}">
                <li class="message-item ${message.read ? 'readed' : ''}">
	                <a href="${ctx.host}/messages/${message.id}" class="item-link item-content">
	                  <div class="item-inner">
	                    <div class="item-title-row">
	                      <div class="item-title"><i class="icon icon-message-${message.read ? 'read' : 'unread'}" style="top: ${message.read ? '-4' : '-1'}px;"></i>&nbsp;&nbsp;${message.title}</div>
	                    </div>
	                    <div class="item-subtitle"><fmt:formatDate value="${message.createTime}" pattern="yyyy-MM-dd" /></div>
	                    <div class="item-text ellipsis">${message.alias}</div>
	                  </div>
	                </a>
	              </li>
              </c:forEach>
            </ul>
          </div>
          
        </div>
      </div>
    </div>
    
    <%@ include file="/WEB-INF/include/script.jsp"%>
    
  </body>
</html>